package cn.maihe.elg.operation.centers.epoint.channel;

import cn.maihe.elg.operation.centers.epoint.channel.service.PTBaohanNoticeChannelService;
import cn.maihe.elg.operation.centers.supports.model.bo.NoticeGuaranteeApplyResultBo;
import cn.maihe.elg.operation.centers.supports.model.bo.NoticePayResultBo;
import cn.maihe.elg.operation.centers.supports.model.bo.PushCenterGuaranteeBo;
import cn.maihe.elg.operation.model.dto.InnerBaseResp;
import cn.maihe.elg.operation.model.enums.CenterNoEnum;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Description  对接莆田新点中心服务
 * @Author WJH
 * @Date 2021/11/12
 */
@Service
@Slf4j
public class PuTianCenterInterfaceServiceImpl extends BaseEpointCenterInterfaceService {
    @Resource
    private PTBaohanNoticeChannelService ptBaohanNoticeChannelService;
    @Override
    public CenterNoEnum getCenterNoEnum() {
        return CenterNoEnum.PUTIAN;
    }
    @Override
    public InnerBaseResp<NoticeGuaranteeApplyResultBo> noticePayResult(NoticePayResultBo bo) {
//        throw new RuntimeException(getCenterNoEnum().getCenterName() + " 暂未实现 电子保函支付结果通知");
        //暂未实现 电子保函支付结果通知 默认返回成功
        return InnerBaseResp.success(bo);
    }

    @Override
    public InnerBaseResp pushGuarantee(PushCenterGuaranteeBo bo) {
        return ptBaohanNoticeChannelService.pushGuarantee(bo);
    }
}
